package test_JiSuanQi;

public class UseCompute {

    public static void compute(ICompute compute, int num1, int num2)
    {
        int result = compute.compute(num1,num2);
        System.out.println(result);
    }

    public static void main(String[] args)
    {
        compute(new Add(), 10, 20);
        UseCompute.compute(new Add(), 99, 88);
        UseCompute.compute(new SubOper(), 99, 88);
        UseCompute.compute(new MulOper(), 99, 88);
        UseCompute.compute(new DiviOper(), 9999, 0);
    }
}
